畫frequency response和phase response(MATLAB))


修DSP時有學到system的frequency response,想要以matlab tool來畫增強對frequency response的感覺,以下以moving average system來當作例子:
matlab code(frequency response)如下:

omega = -2*pi:pi/400:2*pi;
H5 = ((1/5)*(1-exp(-1i*omega*5))./(1-exp(-1i*omega)));
plot(omega,abs(H5)), title('frequency response');

結果的圖如下

matlab code(phase response)如下:

omega = -2*pi:pi/400:2*pi;
H5 = ((1/5)*(1-exp(-1i*omega*5))./(1-exp(-1i*omega)));
plot(omega,angle(H5)), title('Phase plot');

結果的圖如下

#matlab







你可能感興趣的文章

Return first capital letter and its index

Return first capital letter and its index

滲透測試重新打底(2.3)--論Enumeration(枚舉)之NFS & SMB

滲透測試重新打底(2.3)--論Enumeration(枚舉)之NFS & SMB

動態產生呼叫 modal

動態產生呼叫 modal






留言討論